<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php
if (move_uploaded_file($_FILES["file"]["tmp_name"],"../images/".$_FILES["file"]["name"]))
{
	echo "copy/upload complete<br>";

$objConect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
	$objDB=mysql_select_db("appdrivergame");
	mysql_query("SET character_set_results=utf8");
	mysql_query("SET character_set_client=utf8"); 
	mysql_query("SET character_set_connection=utf8");
	$strSQL="insert into image";
	$strSQL.="(image_path,image_name) VALUES('".$_FILES["file"]["name"]."','".$_POST["image_name"]."')";
	$objQuery=mysql_query($strSQL) or die("Error Query[".$strSQL."]");	
}
?>

 <script type="text/javascript">
	window.location.href = "Padmin2.php";
	</script>
</body>
</html>